	
clear all	


*******************************************************************************************************
*******************************************************************************************************
*** Title: Can you spot a scam? Measuring and Improving Scam Identification Ability
*** Authors: Jana Cahlikova, Lucy Kaaria, Elif Kubilay, Eva Raiber, and Lisa Spantig

*** Notes: This do-file replicates the tables in the main text and the appendix. 
*******************************************************************************************************
*******************************************************************************************************



******************************************************************************************************
**List of Tables 
*******************************************************************************************************
*1) TABLE 1: Correlates of Scam Identification Ability and Confidence

*2) TABLE 2: Treatment Effects

	*a) Panel 1: Main Outcomes
	*b) Panel 2: Secondary Outcomes
	
*3) TABLE A2: Balance

*4) TABLE A4: Sample characteristics

*5) TABLE A5: The Effects of Incentives

	*a) Panel 1: Outcomes in Block 1
	*b) Panel 2: Outcomes in Block 2
	
*6) TABLE A6: Confidence weighted by SIA

*7) TABLE B1: Attention Check and Main Treatment Effects

*8) TABLE B2: Treatment Effects: Additional Robustness Checks
	
	*a) Panel 1: Excluding the Baseline SIA and Confidence
	*b) Panel 2: Unincentivized Sample
	*c) Panel 3: Incentivized Sample
	
*9) TABLE B3: Treatment Effects: Varying Control Variables

	*a) Panel 1: Scam Identification Ability
	*b) Panel 2: Confidence


	
***************************************************************************************
*Import data
use "$datapath/online_survey_analysis", clear
***************************************************************************************


**************************
* Define and Label Control Variables
**************************

global indiv_char = "Female Age PostSecondaryEducation LowIncome FormalEmployment"
global design_controls = "OrderSIA_AB Attention_Fail"
global dfsuse_controls = "dfs_trust_low  DFS_diverse "
global scamexp_controls = "ScamExp_2_1 ScamExp_8"
global dfsuse_controls_trust = " DFS_diverse " // have to take out low trust variable


la var Female "Female (0/1)"
la var Urban "Urban (0/1)"
la var PostSecondaryEducation "Post secondary education (0/1)"
la var LowIncome "Low income (0/1)"
la var FormalEmployment "Formal employment (0/1)"
la var PhoneInternet "Internet on phone (0/1)" 
la var PhoneSocialMedia "Social media on phone (0/1)"
la var DFS_4_all "Number of DFS used"
la var DFS_diverse "Above median use of DFS (0/1)"
la var DFS_90days "Recent DFS use (0/1)"

*******************************************************************
*******************************************************************
* TABLE 1: Correlates of Scam Identification Ability and Confidence
*******************************************************************
*******************************************************************

*SIA
reg SIA_share_Part1 $design_controls $indiv_char, vce(hc3) 
est sto spec1

reg SIA_share_Part1 $design_controls $indiv_char $dfsuse_controls, vce(hc3)
est sto spec2

reg SIA_share_Part1 $design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3)
est sto spec3

*Confidence
reg SIA_confidence_Part1 $design_controls $indiv_char, vce(hc3) 
est sto spec4

reg SIA_confidence_Part1 $design_controls $indiv_char $dfsuse_controls, vce(hc3)
est sto spec5

reg SIA_confidence_Part1 $design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3)
est sto spec6


#delimit ;
esttab spec1 spec2 spec3 spec4 spec5 spec6 using "$tables/table1.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep($indiv_char  dfs_trust_low DFS_diverse ScamExp_2_1 ScamExp_8)
coeflabels( Female "\addlinespace[1mm]  Female" Age "Age in Years" PostSecondaryEducation "Post-Seconday Education" LowIncome "Low Income" FormalEmployment "Formal Employment" DFS_90days "\addlinespace[1mm] DFS use in the last 90 Days" dfs_trust_low "Low Trust in DFS" DFS_4_all "Number of DFS used" DFS_diverse "High use of different DFS" ScamExp_2_1 "Contacted less than 1 week ago" ScamExp_8 "\addlinespace[1mm] Victim of a Scammer" ScamExp_10 "Knows Victim of a Scammer")
star(* 0.10 ** 0.05 *** 0.01) refcat(Female "\textbf{Demographics:}" dfs_trust_low "\textbf{DFS Use:}"  ScamExp_2_1 "\textbf{Scam Experience:}", nolabel) nonotes 
s(N r2, fmt(%9.0f %9.2f) labels("N" "R-Squared"))
nogaps mgroups("SIA" "Confidence in SIA", pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) 
substitute("&\multicolumn{2}{S}{" "\multicolumn{2}{c}{")
mtitles ( "(1)" "(2)" "(3)" "(1)" "(2)" "(3)")
;
#delimit cr


*******************************************************************
*******************************************************************
* TABLE 2: Treatment Effects
*******************************************************************
*******************************************************************

***************************
**Panel 1: Main Outcomes***
***************************

*All messages
reg SIA_share_Part2 i.Treatment SIA_share_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1


*Scams
reg scam_correct_share_Part2 i.Treatment scam_correct_share_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec2
sum scam_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2
	
*Non-scams
reg official_correct_share_Part2 i.Treatment official_correct_share_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec3
sum official_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3


*All messages
reg SIA_confidence_Part2 i.Treatment SIA_confidence_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec4


*Scams
reg confidence_scam_part2 i.Treatment confidence_scam_part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec5
sum confidence_scam_part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec5
	
*Non-scams
reg confidence_official_part2 i.Treatment confidence_official_part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec6
sum confidence_official_part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec6



#delimit ;
esttab spec1 spec2 spec3 spec4 spec5 spec6 using "$tables/table2_panel1.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment  3.Treatment)
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean diff2 N r2, fmt(%9.2f %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
nogaps mtitles ( "SIA" "Scams" "Non-scams" "SIA" "Scams" "Non-scams" )
mgroups("Correctly Identified Messages" "Confidence" , pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) 
substitute("&\multicolumn{2}{S}{" "\multicolumn{2}{c}{")
;
#delimit cr



********************************
**Panel 2: Secondary Outcomes***
********************************

reg dfs_trust_low i.Treatment ///
	$design_controls $indiv_char $dfsuse_controls_trust $scamexp_controls , vce(hc3) 
est sto spec1
sum dfs_trust_low if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1	

reg SIA_time_Part2 i.Treatment SIA_time_Part1  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3) 
est sto spec2
sum SIA_time_Part2 if Treatment==0 
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2	
	
reg all_scams_correct_Part2 i.Treatment all_scams_correct_Part1 ///
	$design_controls $indiv_char $dfsuse_controls_trust $scamexp_controls , vce(hc3) 
est sto spec3
sum all_scams_correct_Part2 if Treatment==0 
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3		
	
reg all_official_correct_Part2 i.Treatment all_official_correct_Part1 ///	///
	$design_controls $indiv_char $dfsuse_controls_trust $scamexp_controls , vce(hc3) 
est sto spec4
sum all_official_correct_Part2 if Treatment==0 
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec4		
	
	
#delimit ;
esttab spec1 spec2 spec3 spec4 using "$tables/table2_panel2.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment  3.Treatment)
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
stats(controlmean diff2 N r2, fmt(%9.2f  %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
nogaps 
mtitles ( "Low Trust in DFS" "Response Time SIA" "All Scams Identified" "All Non-scam Identified")
;
#delimit cr	



*******************************************************************
*******************************************************************
* TABLE A2: Balance
*******************************************************************
*******************************************************************

iebaltab ///
	Female Age Urban PostSecondaryEducation LowIncome FormalEmployment PhoneInternet PhoneSocialMedia ///
	DFS_90days 	DFS_4_all DFS_diverse  ///
	, grpv(Treatment)  savet($tables/tableA2.tex) ///
	vce(robust)  stats(desc(se) pair(p) feq(p))   feqtest rowvarlabels format (%9.2f) nonote replace

		

*******************************************************************
*******************************************************************
* TABLE A4: Sample characteristics
*******************************************************************
*******************************************************************

global desc   Female Age Urban PostSecondaryEducation LowIncome FormalEmployment PhoneInternet PhoneSocialMedia DFS_90days DFS_4_all ScamExp_1 ScamExp_8 ScamExp_10 SIA_share_Part1 scam_correct_share_Part1 official_correct_share_Part1 SIA_confidence_Part1 

eststo clear
eststo all: estpost summarize $desc

esttab all using "$tables/tableA4.tex", replace cells("count(fmt(0) label(N)) mean(fmt(2) label(Mean) ) sd (fmt(2) label(SD)) min(fmt(0) label(Min.)) max(fmt(0) label(Max.))") ///
coeflabels(Female "\addlinespace[1mm] Female" Age "Age" Urban "Urban" PostSecondaryEducation "Post secondary education" LowIncome "Low income" FormalEmployment "Formal employment"  PhoneInternet "Internet on phone" PhoneSocialMedia "Social media on phone" DFS_4_all "\addlinespace[1mm] Number of DFS used" DFS_90days "Financial transactions w/ phone in the past 90 days" ScamExp_1 "\addlinespace[1mm] Have you ever been contacted by a scammer?" ScamExp_8 "Ever been a victim of a scammer?"   ScamExp_10 "Anyone you know ever been a victim of a scammer?" SIA_share_Part1 "\addlinespace[1mm] Share of correctly identified messages (SIA)" scam_correct_share_Part1 "Share of correctly identified scams" official_correct_share_Part1 "Share of correctly identified non-scams" SIA_confidence_Part1 "Average confidence in SIA") ///
refcat(Female "\textbf{Demographics}" DFS_4_all "\textbf{DFS Use}" ScamExp_1 "\textbf{Scam Experience}" SIA_share_Part1 "\textbf{Scam Identification Ability (Block 1)}", nolabel) noobs nonotes nomtitle nonumber



*******************************************************************
*******************************************************************
* TABLE A5: The Effects of Incentives
*******************************************************************
*******************************************************************

********************************
**Panel 1: Outcomes in Block 1**
********************************
* SIA
reg SIA_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec1
sum SIA_share_Part1 if Treatment==0
estadd scalar controlmean= r(mean)

* Scams Identified
reg scam_correct_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3) 
est sto spec2
sum scam_correct_share_Part1 if Treatment==0
estadd scalar controlmean= r(mean)

	
* Non-scams Identified	
reg official_correct_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3) 	
est sto spec3
sum official_correct_share_Part1 if Treatment==0
estadd scalar controlmean= r(mean)
	
* confidence	
reg SIA_confidence_Part1 i.Treatment   ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3)
est sto spec4
sum SIA_confidence_Part1 if Treatment==0
estadd scalar controlmean= r(mean)


#delimit ;
esttab spec1 spec2 spec3 spec4  using "$tables/tableA5_panel1.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(2.Treatment  )
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)" 2.Treatment "Incentives")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean  N r2, fmt(%9.2f  %9.0f %9.2f) labels("Control Mean"  "N" "R-Squared"))
nogaps mtitles ( "SIA" "Scams Identified" "Non-scams Identified" "Confidence")
;
#delimit cr

********************************
**Panel 2: Outcomes in Block 2**
********************************

*All messages
reg SIA_share_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)

*Scams
reg scam_correct_share_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec2
sum scam_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
	
*Non-scams
reg official_correct_share_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec3
sum official_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)

*Confidence
reg SIA_confidence_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)


#delimit ;
esttab spec1 spec2 spec3 spec4  using "$tables/tableA5_panel2.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(2.Treatment  )
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)" 2.Treatment "Incentives")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean  N r2, fmt(%9.2f  %9.0f %9.2f) labels("Control Mean"  "N" "R-Squared"))
nogaps mtitles ( "SIA" "Scams Identified" "Non-scams Identified" "Confidence")
;
#delimit cr


*******************************************************************
*******************************************************************
* TABLE A6: Confidence weighted by SIA
*******************************************************************
*******************************************************************

* All messages 
reg SIA_confidence_Part2_weighted i.Treatment SIA_confidence_Part1_weighted ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3) 
est sto spec1
sum SIA_confidence_Part2_weighted if Treatment==0 
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1

*Scams
reg SIA_conf_Part2_scam_weighted i.Treatment SIA_conf_Part1_scam_weighted ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3) 
est sto spec2
sum SIA_conf_Part2_scam_weighted if Treatment==0 
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2

*Non-scams
reg SIA_conf_Part2_offi_weighted i.Treatment SIA_conf_Part1_offi_weighted ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls , vce(hc3) 
est sto spec3
sum SIA_conf_Part2_offi_weighted if Treatment==0 
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3

#delimit ;
esttab spec1 spec2 spec3 using "$tables/tableA6.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment  3.Treatment)
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean diff2 N r2, fmt(%9.2f  %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
mtitles ("All messages" "Scams" "Non-scams")
;
#delimit cr


*******************************************************************
*******************************************************************
* TABLE B1: Attention Check and Main Treatment Effects
*******************************************************************
*******************************************************************


preserve

* All messages
reg SIA_share_Part2 i.Treatment SIA_share_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls if Attention_Fail==0, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==0 & Attention_Fail==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1

* Scams
reg scam_correct_share_Part2 i.Treatment scam_correct_share_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls if Attention_Fail==0, vce(hc3) 
est sto spec2
sum scam_correct_share_Part2 if Treatment==0 & Attention_Fail==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2
	
* Non-scams
reg official_correct_share_Part2 i.Treatment official_correct_share_Part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls if Attention_Fail==0, vce(hc3) 	
est sto spec3
sum official_correct_share_Part2 if Treatment==0 & Attention_Fail==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3
	
* All messages	
reg SIA_confidence_Part2 i.Treatment SIA_confidence_Part1  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls if Attention_Fail==0, vce(hc3)
est sto spec4
sum SIA_confidence_Part2 if Treatment==0 & Attention_Fail==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec4

*Scams
reg confidence_scam_part2 i.Treatment confidence_scam_part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls if Attention_Fail==0, vce(hc3) 
est sto spec5
sum confidence_scam_part2 if Treatment==0 & Attention_Fail==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec5
	
*Non-scams
reg confidence_official_part2 i.Treatment confidence_official_part1 ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls if Attention_Fail==0, vce(hc3) 	
est sto spec6
sum confidence_official_part2 if Treatment==0 & Attention_Fail==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec6

global design_controls_attention = "OrderSIA_AB "

* failed attention
reg Attention_Fail i.Treatment ///
	$design_controls_attention $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3)
est sto spec7
sum Attention_Fail if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec7	


#delimit ;
esttab spec1 spec2 spec3 spec4 spec5 spec6 spec7 using "$tables/tableB1.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment  3.Treatment)
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)" )
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean diff2 N r2, fmt(%9.2f  %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
 mgroups("Passed Attention Check (SIA)" "Passed Attention Check (Confidence)" "All", pattern(1 0 0 1 0 0 1) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) 
nogaps mtitles ( "All" "Scams" "Non-scams" "All" "Scams" "Non-scams" "Failed Attention")
;
#delimit cr

restore

*******************************************************************
*******************************************************************
* TABLE B2: Treatment Effects: Additional Robustness Checks
*******************************************************************
*******************************************************************

**************************************************************
****Panel 1: Excluding the Baseline SIA and Confidence********
**************************************************************


*All messages
reg SIA_share_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1


*Scams
reg scam_correct_share_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec2
sum scam_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2
	
*Non-scams 
reg official_correct_share_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec3
sum official_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3


*All messages
reg SIA_confidence_Part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec4


*Scams
reg confidence_scam_part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec5
sum confidence_scam_part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec5
	
*Non-scams
reg confidence_official_part2 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec6
sum confidence_official_part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec6


#delimit ;
esttab spec1 spec2 spec3 spec4 spec5 spec6 using "$tables/tableB2_panel1.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment  3.Treatment)
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean diff2 N r2, fmt(%9.2f  %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
nogaps mtitles ( "SIA" "Scams" "Non-scams" "SIA" "Scams" "Non-scams" )
mgroups("Correctly Identified Messages" "Confidence" , pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) 
substitute("&\multicolumn{2}{S}{" "\multicolumn{2}{c}{")
;
#delimit cr

*********************************
**Panel 2: Incentivized Sample***
********************************

preserve

*Drop the unincentivized sample 
drop if Treatment == 0 | Treatment == 1

*All messages
reg SIA_share_Part2 SIA_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==2
estadd scalar controlmean= r(mean)

*Scams 
reg scam_correct_share_Part2 scam_correct_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec2
sum scam_correct_share_Part2 if Treatment==2
estadd scalar controlmean= r(mean)

	
*Non-scams 
reg official_correct_share_Part2 official_correct_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec3
sum official_correct_share_Part2 if Treatment==2
estadd scalar controlmean= r(mean)


*All messages
reg SIA_confidence_Part2 SIA_confidence_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_confidence_Part2 if Treatment==2
estadd scalar controlmean= r(mean)


*Scams
reg confidence_scam_part2 confidence_scam_part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec5
sum confidence_scam_part2 if Treatment==2
estadd scalar controlmean= r(mean)

	
*Non-scams
reg confidence_official_part2 confidence_official_part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec6
sum confidence_official_part2 if Treatment==2
estadd scalar controlmean= r(mean)



#delimit ;
esttab spec1 spec2 spec3 spec4 spec5 spec6 using "$tables/tableB2_panel2.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(3.Treatment)
coeflabels(3.Treatment "Tips (incentivized)")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean N r2, fmt(%9.2f %9.0f %9.2f) labels("Incentives (no-tips) Mean" "N" "R-Squared"))
nogaps mtitles ( "SIA" "Scams" "Non-scams" "SIA" "Scams" "Non-scams" )
mgroups("Correctly Identified Messages" "Confidence" , pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) 
substitute("&\multicolumn{2}{S}{" "\multicolumn{2}{c}{")
;
#delimit cr
restore

***********************************
**Panel 3: Unincentivized Sample***
***********************************

preserve

*Drop the incentivized sample
drop if Treatment == 2 | Treatment == 3

*All messages
reg SIA_share_Part2 SIA_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)

*Scams 
reg scam_correct_share_Part2 scam_correct_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec2
sum scam_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)

	
*Non-scams 
reg official_correct_share_Part2 official_correct_share_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec3
sum official_correct_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)


*All messages
reg SIA_confidence_Part2 SIA_confidence_Part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)


*Scams
reg confidence_scam_part2 confidence_scam_part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec5
sum confidence_scam_part2 if Treatment==0
estadd scalar controlmean= r(mean)

	
*Non-scams
reg confidence_official_part2 confidence_official_part1 i.Treatment  ///
	$design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 	
est sto spec6
sum confidence_official_part2 if Treatment==0
estadd scalar controlmean= r(mean)



#delimit ;
esttab spec1 spec2 spec3 spec4 spec5 spec6 using "$tables/tableB2_panel3.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment)
coeflabels(1.Treatment "Tips (unincentivized)")
star(* 0.10 ** 0.05 *** 0.01) nonotes 
s(controlmean N r2, fmt(%9.2f %9.0f %9.2f) labels("Control Mean" "N" "R-Squared"))
nogaps mtitles ( "SIA" "Scams" "Non-scams" "SIA" "Scams" "Non-scams" )
mgroups("Correctly Identified Messages" "Confidence" , pattern(1 0 0 1 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) 
substitute("&\multicolumn{2}{S}{" "\multicolumn{2}{c}{")
;
#delimit cr
restore


*******************************************************************
*******************************************************************
* TABLE B3: Treatment Effects: Varying Control Variables
*******************************************************************
*******************************************************************

*****************************************
**Panel 1: Scam Identification Ability***
*****************************************

reg  SIA_share_Part2 i.Treatment  SIA_share_Part1, vce(hc3) 
est sto spec1
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1

reg  SIA_share_Part2 i.Treatment  SIA_share_Part1 $indiv_char , vce(hc3) 
est sto spec2
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2

reg  SIA_share_Part2 i.Treatment  SIA_share_Part1 $indiv_char $design_controls, vce(hc3) 
est sto spec3
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3


reg  SIA_share_Part2 i.Treatment SIA_share_Part1 $design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_share_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec4


#delimit ;
esttab spec1 spec2 spec3 spec4  using "$tables/tableB3_panel1.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment 3.Treatment) indicate("Demographics = $indiv_char" "Design Controls = $design_controls"  "Scam Experience = $scamexp_controls", labels("\checkmark" ""))
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)" 2.Treatment "Incentives")
star(* 0.10 ** 0.05 *** 0.01) nonotes mtitles("(1)" "(2)" "(3)" "(4)")
s(controlmean diff2 N r2, fmt(%9.2f  %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
nogaps
;
#delimit cr


*************************
**Panel 2: Confidence****
*************************


reg  SIA_confidence_Part2 i.Treatment  SIA_confidence_Part1, vce(hc3) 
est sto spec1
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec1

reg  SIA_confidence_Part2 i.Treatment SIA_confidence_Part1 $indiv_char , vce(hc3) 
est sto spec2
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec2


reg  SIA_confidence_Part2 i.Treatment SIA_confidence_Part1 $indiv_char $design_controls, vce(hc3) 
est sto spec3
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec3


reg  SIA_confidence_Part2 i.Treatment  SIA_confidence_Part1 $design_controls $indiv_char $dfsuse_controls $scamexp_controls, vce(hc3) 
est sto spec4
sum SIA_confidence_Part2 if Treatment==0
estadd scalar controlmean= r(mean)
test 1.Treatment = 3.Treatment
estadd scalar diff2=r(p): spec4



#delimit ;
esttab spec1 spec2 spec3 spec4  using "$tables/tableB3_panel2.tex",  replace label compress b(%8.2f) se(2) noconstant
nonumbers keep(1.Treatment 3.Treatment) indicate("Demographics = $indiv_char" "Design Controls = $design_controls"  "Scam Experience = $scamexp_controls", labels("\checkmark" ""))
coeflabels(1.Treatment "Tips (unincentivized)"  3.Treatment "Tips (incentivized)" 2.Treatment "Incentives")
star(* 0.10 ** 0.05 *** 0.01) nonotes mtitles("(1)" "(2)" "(3)" "(4)")
s(controlmean diff2 N r2, fmt(%9.2f  %9.2f %9.0f %9.2f) labels("Control Mean" "p-value (\(Tips^{U} = Tips^{I}\))"  "N" "R-Squared"))
nogaps
;
#delimit cr
